/*
 * 作者: junmu
 * 时间: 2025-07-22
 */
package com.hzbc.faceattendance.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.media.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .components(new Components()
                        .addSchemas("ApiResponse", new ObjectSchema()
                                .addProperty("flag", new BooleanSchema())
                                .addProperty("status", new IntegerSchema())
                                .addProperty("msg", new StringSchema())
                                .addProperty("data", new Schema<>())
                        )
                );
    }
}